const uploadRouter = require('express').Router();
const upload = require('../utils/upload');

//路由请求
uploadRouter.get('/upload', (req,res)=>{
  res.render('upload');
})
// 上传文件路由
uploadRouter.post('/upload', upload.single('file'), function (req, res) {
  res.send({
    code: 0,
    msg: '上传成功'
  })
})
module.exports = uploadRouter;